package be.nvlooy.moviereminder.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping
public class IndexController extends BasicController {
	
	@RequestMapping(value = "/")
	public String index() {
		if(!isAuthenticated())
			return "index";
		else
			return "redirect:/collection";
	}
	
	@RequestMapping(value = "/login")
	public String login() {
		if(!isAuthenticated())
			return "login";
		else
			return "redirect:/collection";
	}
	
}
